struct Solution {}

fn main() {}

impl Solution {
    pub fn even_odd_bit(n: i32) -> Vec<i32> {
        let mut bit_list = vec![];
        let mut i = n;
        while i > 0 {
            let rs = i % 2;
            bit_list.push(rs);
            i /= 2;
        }

        let mut ret = vec![];
        let mut odd = 0;
        let mut even = 0;
        for re in 0..bit_list.len() {
            if bit_list[re] == 1 {
                if re % 2 == 1 {
                    odd += 1;
                } else {
                    even += 1;
                }
            }
        }
        ret.push(even);
        ret.push(odd);
        ret
    }
}